package org.dromara.business.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.business.domain.Coupon;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.json.handler.DecimalRemoveZeroSerializer;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;


/**
 * 拼团优惠券视图对象 coupon
 *
 * @author zlj
 * @date 2025-04-27
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = Coupon.class)
public class CouponVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long couponId;

    /**
     * 金额
     */
    @ExcelProperty(value = "金额")
    @JsonSerialize(using = DecimalRemoveZeroSerializer.class)
    private BigDecimal amount;

    /**
     * 优惠券id
     */
    @ExcelProperty(value = "优惠券id")
    private Long goodsCouponId;
    private Long createBy;
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
    private String userName;

    /**
     * 是否使用 1已使用 0未使用
     */
    @ExcelProperty(value = "是否使用 1已使用 0未使用", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "coupon_status")
    private String status;

    private String name;
    private String remark;
    /**
     * 满多少可用
     */
    private BigDecimal conditionAmount;
}
